<!-- BLOCK CAC THEME MOI NHAT -->
<?php
	$sql = "SELECT * FROM websites ORDER BY id DESC LIMIT 2";
	$connection = yii::app()->db;
	$command = $connection->createCommand($sql);
	$result =  $command->queryAll();
?>
<h2 class="title">THEME MỚI NHẤT</h2>
<div class="box-list-preview other-theme">
<?php if(!empty($result)){ ?>
	<ul>
	<?php foreach($result as $theme){ ?>
		<li>
			<a href="<?php echo PIUrl::createUrl('/home/themeDetail', array("alias"=>$theme['alias'],));?>">
				<div class="wrap-image">
					<img src="<?php echo getImage($theme['image'], 306, 193); ?>" alt="img" width="223" height="165">
					<i class="icon-ib icon-view"></i>
				</div>
				<h4><?php echo $theme['name']; ?></h4>
			</a>
		</li>
	<?php } ?>
	</ul>
<?php } ?>
</div>
